package com.ryh.service;

import com.ryh.dao.ReaderDao;
import com.ryh.entity.Reader;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReaderService {

    @Autowired
    private ReaderDao ReaderDao;

    public List<Reader> getAllReaders() {
        return ReaderDao.getAllReaders();
    }

    public Reader getReaderById(String readerId) {
        return ReaderDao.getReaderById(readerId);
    }

    public void addReader(Reader reader) {
        ReaderDao.addReader(reader);
    }

    public void updateReader(Reader reader) {
        ReaderDao.updateReader(reader);
    }

    public void deleteReader(String readerId) {
        ReaderDao.deleteReader(readerId);
    }
}